<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="com.example.Homework7.user" %><%--
        Created by IntelliJ IDEA.
        User: WHH
        --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>Title</title>
</head>
<body>
<%
        List list = new ArrayList();
        list.add(new user("张三",22,"福建"));
        list.add(new user("李四",23,"江西"));
        list.add(new user("王五",25,"浙江"));
        request.setAttribute("list",list);
        %>
<table border="1" width="500" align="center">
<tr>
<td>编号</td>
<td>姓名</td>
<td>年龄</td>
<td>地址</td>
<td>操作</td>
</tr>
<c:forEach items="${list}" var="user" varStatus="s">
<tr>
<td>${s.count}</td>
<td>${user.name}</td>
<td>${user.age}</td>
<td>${user.ardress}</td>
<td>
<button onclick="javascript:location.href='c1/test.jsp?userIndex=${s.index}'">删除</button>
</td>
</tr>
</c:forEach>
</table>
</body>
</html>
